<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="../css/reset.css" rel="stylesheet" type="text/css" />
<style>
	.placeholder {color: #999;text-align: left;font-size: 10px;}
	table, td {
		border: none;
		border-right: 0px;
		border-bottom: 0px;
		border-collapse: collapse;
		line-height: 20px;
	}
	td { padding: 1px;
		border: none;
		border-top: 0px;
		border-left: 0px;
	}
</style>
<style>html,body{ height: 100%;overflow: hidden;}</style>
<script src="../js/jquery.js"></script>
<script src="../js/jquery.placeholder.js"></script>
<script src="../js/config.js"></script>
<script src="../js/iPlaceholder.js"></script>
<script src="../js/common.js"></script>
<script src="../js/utils.js"></script>
<script src="../js/formatData.js"></script>
<script src="../js/Calendar3.js"></script>
<script>
	$(document).ready(function() {
		$('#taxpayerId').val(new Date().format('yyyy-MM-dd'));
		getMenuList(1);
	});
	function getFormPageInfo(){
		var childMenuId = $('#childMenu').val();
		alert(childMenuId);
		var date = $('#taxpayerId').val();
		var nsrsbh = $('#nsrsbh').val();
		$.ajax({
			type: "GET",
	        url: config.baseURL + "report/getFormById.action",
	        cache:false,
	        dataType: "json",
	        data : {
				"formId":childMenuId //小类业务ID
	        },
	        success: function(data){
	        	if(data.result.success==true){
	        	alert(data.list[0]);
	        		$('#formPage').attr('src',config.baseURL+'forms/'+data.list[0]);
	        		return;
	        		$.ajax({
			            type: "GET",
			            url: config.baseURL + "common/sendHttp.action",
			            cache:false,
			            dataType: "xml",
			            data : {
			                "url":config.interfaceCenterBaseURL + "/interface/getTaxpayerInfo.action",
			                "taxpayer":formId,
			                "typeId":childMenuId
			            },
			            success: function(xml){
			            	$(xml).find("resultInfo").each(function(i){
			                    var name = $(this).attr("name");
			                    var value = $(this).text();
			                    $('#'+name, document.frames('formPage').document).val(value); 
			                    $('#'+name, document.frames('formPage').document).removeClass('placeholder');
			                    if(name=='nsrsbh'){
			                		if($('#nsrsbhTr',document.frames('formPage').document).attr('size') > 0){
			                    		for(var i=0;i<value.length;i++){
			                    			$('#nsrsbhTd'+(i+1),document.frames('formPage').document).text(value.substr(i,1));
			                    		}
			                    	}
			                    }
			                });
			            },
			            error:function(){
			            }
		       		});
	        	}
	        }
		});
	}
</script>
</head>

<body>
<div class="main">
	<div class='main_tool'>
		<div class="nav">
	    	您当前的位置：<span class="par" id="menuName">统计分析</span> &gt;&gt; <span class="pag" id="childMenuName">表证单书受理明细查询</span>
	    </div>
	    <table class="toolbar" style="width: 100%;">
            <tr style="height:25px;">
                <td width="20px;" style="padding-left: 10px;background: url(images/toolbar.png) no-repeat 0 0;">
                	<span style="float:left; padding:0 10px;">
                		<button class="printBtn" onclick="javascript:utils.printReport();" title="打印" style="margin-top: 0;"></button>
                    </span>
                </td>
                <td width="900"><label>业务类别：</label>
                	<select id="menu"></select>
                		<label>&nbsp;业务名称：</label>
                	<select id="childMenu" style="width:120px;overflow: hidden;">
                	</select>
                	<label>&nbsp;查询日期：</label>
                	<input type="text" id="taxpayerId" class="searchText_formDetail" style="cursor:pointer;" onclick="new Calendar().show(this);"/>
                	<label>&nbsp;纳税人识别号：</label>
                    <input type="text" name="nsrsbh" id="nsrsbh" class="queryDateTxt" placeholder="纳税人识别号" style="width:150px;"/>
                </td>
                <td>
                	<span style="float:left; padding:0 10px;">
                		<button class="formSwjgBtn" title="查询" onclick="getFormPageInfo()"></button>
                    </span>
                </td>
            </tr>
        </table>
    </div>
	<div class="tableWrap" style="text-align:center;">
		<iframe src ="" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" id="formPage" name="formPage" height="495" width="1000"></iframe> 
	</div>
</div>
</body>
</html>
